@echo on

#set input_param1=%1%
set /p input_param1=input version:

if "%input_param1%" == "" (
	echo error input null: 64r 
	pause
	exit
)

set bin_dst_dir=libbasetool32r\\lib
set include_dst_dir=libbasetool32r\\include

rd /s/q %bin_dst_dir%
rd /s/q %include_dst_dir%

md %bin_dst_dir%
md %include_dst_dir%


set sltoolSrcDir=..\\sl_tool
set SLAsynFrameSrcDir=..\\sl_asyn_frame
set SLNetSrcDir=..\\sl_net
set SLNetFrameSrcDir=..\\sl_net_frame
set SLAIGJsonSrcDir=..\\AIGCJson

COPY %sltoolSrcDir%\\SLT_log.h  			%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_memory.h  			%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_resendList.h 		%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_thread_pool.h 		%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_timer.h 			%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_tool_pub.h 		%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_tool_pub_def.h 	%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_uuid.h 			%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_rwlock.h 			%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_smartEmbedPtr.h 	%include_dst_dir%\\
COPY %sltoolSrcDir%\\SLT_filesystem.h    	%include_dst_dir%\\

COPY %SLAsynFrameSrcDir%\\SL_asynFrame.h 	%include_dst_dir%\\
COPY %SLAsynFrameSrcDir%\\SL_asynFramePub.h 	%include_dst_dir%\\

COPY %SLNetSrcDir%\\SL_net.h  	    %include_dst_dir%\\
COPY %SLNetSrcDir%\\SL_tcpServer.h  	%include_dst_dir%\\
COPY %SLNetSrcDir%\\SL_tcpClient.h  	%include_dst_dir%\\
	 
COPY %SLNetFrameSrcDir%\\SLT_csConnect.h  	%include_dst_dir%\\
COPY %SLNetFrameSrcDir%\\SLT_tcpSender.h  	%include_dst_dir%\\

md %include_dst_dir%\\AIGCJson
xcopy %SLAIGJsonSrcDir% %include_dst_dir%\\AIGCJson  /s /e /i /y

COPY out32r\\slbasetooldll.dll  	%bin_dst_dir%\\
COPY out32r\\slbasetooldll.lib  	%bin_dst_dir%\\
COPY out32r\\slbasetooldll.pdb  	%bin_dst_dir%\\
COPY ..\\config\\config_log.ini		%bin_dst_dir%\\

zip -r sl_base_tool_win_release_x86_%input_param1%.zip libbasetool32r
pause